﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;

namespace OnlineAuction
{
    /// <summary>
    /// Summary description for Service1
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class Service1 : System.Web.Services.WebService
    {

        [WebMethod]
        public int[] AuthenticateUser(string username, string password, string server)
        {
            DauGiaDataContext context = new DauGiaDataContext();

            int? type = 0;
            int? sts = 0;
            context.GetAuthentication(username, password, ref type, ref sts);
           
            int[] result = new int[2];
            result[0] = (int)type;
            result[1] = (int)sts;
            return result;
        }
    }
}
